﻿@model PageList<UserListModel>
@{
    ViewBag.Title = "用户列表";
}
@section BodyNav
{
> 用户列表
}
<table class="list">
    <tr class="head">
        <th width="110">
            操作
        </th>
        <th>
            用户名
        </th>
        <th>
            真实姓名
        </th>
        <th>
            用户类型
        </th>
    </tr>
    @if (Model != null)
    {
        foreach (var t in Model)
        {
        <tr>
            <td>
                @Html.ActionLink("查看", "Detail", "User", new { Id = @t.Id }, new { @class = "lnkDetail" })
                @if (UserAuthnicationHelper.CurrentUserType >= UserTypes.Operator)
                {
                    @Html.ActionLink("修改", "Edit", "User", new { Id = @t.Id }, new { @class = "lnkEdit" })
                    @Html.ActionLink("删除", "Delete", "User", new { Id = @t.Id }, new { @class = "lnkDel" })
                }
            </td>
            <td>@t.UserName
            </td>
            <td>@t.RealName
            </td>
            <td>@t.UserTypeString
            </td>
        </tr>
        }
    }
</table>
@Html.ActionLink("添加新用户", "Add", "User", null, new { @class = "lnkBtn" })
